package cn.da.shuai.cool.finance.model;

import cn.da.shuai.cool.common.entity.EntityBase;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cool_financial_analytics")
public class CoolFinancialAnalytics extends EntityBase {

    private Long id;

    @TableField("analysis_date")
    private LocalDate analysisDate;

    @TableField("fiscal_year")
    private Integer fiscalYear;

    @TableField("fiscal_quarter")
    private Integer fiscalQuarter;

    @TableField("fiscal_month")
    private Integer fiscalMonth;

    @TableField("department_id")
    private Long departmentId;

    @TableField("category")
    private String category;

    // 流动比率 (Current Ratio)
    @TableField("current_ratio")
    private BigDecimal currentRatio;

    // 速动比率 (Quick Ratio)
    @TableField("quick_ratio")
    private BigDecimal quickRatio;

    // 资产负债率 (Debt to Assets Ratio)
    @TableField("debt_to_assets_ratio")
    private BigDecimal debtToAssetsRatio;

    // 权益乘数 (Equity Multiplier)
    @TableField("equity_multiplier")
    private BigDecimal equityMultiplier;

    // 毛利率 (Gross Margin)
    @TableField("gross_margin")
    private BigDecimal grossMargin;

    // 净利率 (Net Profit Margin)
    @TableField("net_profit_margin")
    private BigDecimal netProfitMargin;

    // 资产回报率 (Return on Assets)
    @TableField("return_on_assets")
    private BigDecimal returnOnAssets;

    // 股本回报率 (Return on Equity)
    @TableField("return_on_equity")
    private BigDecimal returnOnEquity;

    // 存货周转率 (Inventory Turnover)
    @TableField("inventory_turnover")
    private BigDecimal inventoryTurnover;

    // 应收账款周转率 (Accounts Receivable Turnover)
    @TableField("accounts_receivable_turnover")
    private BigDecimal accountsReceivableTurnover;

    // 应付账款周转率 (Accounts Payable Turnover)
    @TableField("accounts_payable_turnover")
    private BigDecimal accountsPayableTurnover;

    // 现金转换周期 (Cash Conversion Cycle)
    @TableField("cash_conversion_cycle")
    private BigDecimal cashConversionCycle;

    // 营运资本 (Working Capital)
    @TableField("working_capital")
    private BigDecimal workingCapital;

    // 预算执行率 (Budget Execution Rate)
    @TableField("budget_execution_rate")
    private BigDecimal budgetExecutionRate;

    // 预算差异 (Budget Variance)
    @TableField("budget_variance")
    private BigDecimal budgetVariance;

    // 预算差异百分比 (Budget Variance Percentage)
    @TableField("budget_variance_percentage")
    private BigDecimal budgetVariancePercentage;

    @TableField("notes")
    private String notes;
}